
import Vue from 'vue'
import Vuex from 'vuex';

import * as actions from './actions'

Vue.use(Vuex);

const store = new Vuex.Store({
    actions,
    modules: {
        polling:{
            state : {
                polling: false
            },
            getters : {
                polling: (state)=>state.polling
            },
            mutations : {
                ['CHANGE_POLLING'](state, data){
                    state.polling = data;
                }
            }
        },
        url:{
            state : {
                url: ''
            },
            getters : {
                url: (state)=>state.url
            },
            mutations : {
                ['GET_URL'](state, data){
                    state.url = data;
                }
            }
        }
    }
});
export default store;
